<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App',
  watch: {
    $route (to, from) {
      let obj
      if (to.path !== '/login') {
        obj = {
          name: to.name,
          title: to.meta.title
        }
      }
      // if (to.path === '/userCenter') {
      //   obj = {
      //     name: to.name,
      //     title: '个人中心'
      //   }
      // }
      this.$store.commit('addTab', obj)
    }
  }

}
</script>
<style>
html,
body,
#app {
  font-family: "Helvetica Neue", "Hiragino Sans GB", "WenQuanYi Micro Hei",
    "Microsoft Yahei", sans-serif;
  height: 100%;
  padding: 0;
  margin: 0;
  font-size: 15px;
}
</style>
